/*
******************
* author: 马丰彦
* date: 2019-08-15
* function: 用户账单列表api
******************
*/

import request from '@/utils/request'

// 请求支付渠道列表
export function getList(data) {
  return request({
    url: '/paymentChannel/manage.do',
    method: 'post',
    data
  })
}

// 支付渠道信息保存
export function saveList(data) {
  return request({
    url: '/paymentChannel/save.do',
    method: 'post',
    data
  })
}

// 支付渠道信息详情
export function watchDetail(data) {
  return request({
    url: '/paymentChannel/queryDetails.do',
    method: 'post',
    data
  })
}

// 支付渠道名字是否重复
export function nameRepeat(data) {
  return request({
    url: '/paymentChannel/checkBillingChannelName.do',
    method: 'post',
    data
  })
}

// 校验支付渠道标识是否存在接口
export function orHasSave(data) {
  return request({
    url: '/paymentChannel/checkBillingChannelId.do',
    method: 'post',
    data
  })
}

// 计费码管理列表
export function getPayList(data) {
  return request({
    url: '/paymentChannel/billingCode/manage.do',
    method: 'post',
    data
  })
}

// 计费码保存
export function paySave(data) {
  return request({
    url: '/paymentChannel/billingCode/save.do',
    method: 'post',
    data
  })
}

// 计费码标识是否存在
export function orHave(data) {
  return request({
    url: '/paymentChannel/billingCode/checkBillingCode.do',
    method: 'post',
    data
  })
}

// 计费码名称是否存在
export function nameOrHas(data) {
  return request({
    url: '/paymentChannel/billingCode/checkBillingCodeName.do',
    method: 'post',
    data
  })
}

// 计费码详情
export function payDetail(data) {
  return request({
    url: '/paymentChannel/billingCode/queryDetails.do',
    method: 'post',
    data
  })
}

// 计费码删除
export function payDelete(data) {
  return request({
    url: '/paymentChannel/billingCode/delete.do',
    method: 'post',
    data
  })
}

// 计费码下载
export function payDownLoad(data) {
  return request({
    url: '/paymentChannel/billingCode/billingCodeTemplate.do',
    method: 'post',
    data
  })
}

// 计费码上传
export function payUpload(data) {
  return request({
    url: '/paymentChannel/billingCode/billingCodeTemplate/import.do',
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    method: 'post',
    data
  })
}
